package com.cro.prison.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cro.prison.entity.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserDao extends BaseMapper<User> {
    //登录
    @Select( "SELECT * FROM tbl_users WHERE username=#{username} AND password=#{password}")
    public User login(@Param("username") String username, @Param("password") String password);


    @Select( "SELECT * FROM tbl_users WHERE uid=#{id}")
    public User selectById(Long id);

//    List<User> selectByRecord(@Param("u") User u);
}
